package org.xm.sk.vo.ob;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Transient;

import org.xm.sk.vo.Base;
import org.xm.sk.vo.e.CouponStatus;
import org.xm.sk.vo.tb.Activity;
import org.xm.sk.vo.tb.Item;
import org.xm.sk.vo.tb.Shop;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value = "Coupon4User", description = "优惠券信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Coupon4User {

    @ApiModelProperty(value = "优惠券ID")
    Integer id;

    @ApiModelProperty(value = "优惠券名称")
    String name;

    @ApiModelProperty(value = "优惠券所属门店ID")
    Integer shopId;

    @ApiModelProperty(value = "优惠券所属门店名称")
    String shopName;

    @ApiModelProperty(value = "优惠券所属发型师ID")
    Integer hairdresseId;

    @ApiModelProperty(value = "优惠券所属发型师名称")
    String hairdresseName;

    @ApiModelProperty(value = "优惠券号")
    String couponnum;

    @ApiModelProperty(value = "优惠券使用状态")
    CouponStatus status;

    @ApiModelProperty(value = "活动条件")
    String conditions;

    @ApiModelProperty(value = "活动范围")
    String scope;

    @ApiModelProperty(value = "优惠券有效时间")
    Date deadline;

    @ApiModelProperty(value = "优惠价格")
    Double price;
    
    @ApiModelProperty(value = "活动ID")
    Integer activityId;
    
    @ApiModelProperty(value = "优惠活动图片ID集")
    Set<Integer> imageIds = new HashSet<Integer>(0);
    
    @ApiModelProperty(value = "适用门店ID集")
    @Transient
    private Set<Integer> shopIds = new HashSet<Integer>();
    
    @ApiModelProperty(value = "适用门店名称集")
    @Transient
    private Set<String> shopNames = new HashSet<String>();
    
    @ApiModelProperty(value = "适用项目ID集")
    @Transient
    private Set<Integer> itemIds = new HashSet<Integer>();
    
    @ApiModelProperty(value = "适用项目名称集")
    @Transient
    private Set<String> itemNames = new HashSet<String>();

    public Coupon4User(Integer id, String name, Integer shopId, String shopName, Integer hairdresseId, String hairdresseName, String couponnum, CouponStatus status,
            String conditions, String scope, Date deadline, Double price, Integer activityId) {
        this.id = id;
        this.name = name;
        this.shopId = shopId;
        this.shopName = shopName;
        this.hairdresseId = hairdresseId;
        this.hairdresseName = hairdresseName;
        this.couponnum = couponnum;
        this.status = status;
        this.conditions = conditions;
        this.scope = scope;
        this.deadline = deadline;
        this.price = price;
        this.activityId = activityId;
    }
}
